DaniWeb Graphics
and Web Design Community
Loading
Home
Recent Posts
Revenue Sharing
Register
Contact Us
Login
Username
Password
Forgot your password?
|
Register
Welcome to TechnicalTalk.Net forum!
It seems that you are not a member yet. To interact with other members and to post on the forum.
Get a free account now
Earn money on this forum
Advertise with us...
TechnicalTalk
»
Graphics and Web Design
»
HTML/XHTML/DHTML & CSS
»
404 redirection... .htaccess?
Quick Links:
Want to earn money on forum? visit -->
Earn money on forum
Add to Reputation:
Reputation
What do you think of this post?
I agree
I disagree
Comment:
Pages: [
1
]
Go Down
Email this topic
|
Print
0 Members and 1 Guest are viewing this topic.
404 redirection... .htaccess?
El Canadiano
Reputation Power: 1
Regular Coder
Posts: 51
Topics: 3
404 redirection... .htaccess?
April 21, 2010, 05:07:49 AM
Hey guys,
I just wanted to know if there is a way I could do this algorithm. It deals with redirecting a page to a page in a folder of the same name in case of a dead page (404).
1.) If the page loads correctly, do nothing.
2.) If the page has a 404 error in
http://www.domain.com/XXXXX
, redirect it to
http://www.domain.com/forum/XXXXX
. XXXXX is often subsituted as $1 from what I know.
3.) if
http://www.domain.com/forum/XXXXX
is a dead link, redirect it to a 404 page.
Unofficial Rock Band Forums
polas
Reputation Power: 17
Code Guru
Gender:
Posts: 1403
Topics: 86
Re: 404 redirection... .htaccess?
April 22, 2010, 11:50:06 AM
With htaccess you can set up redirections with specific redex rules like redirection sites do or else in htaccess direct 404 to a php page and then via getenv('REQUEST_URI'); get the requesting page name which you can use to redirect to.
Mesham Type Oriented Parallel Programming Language
,
Free online technical support
Abhi
Reputation Power: 19
Code Guru
Location: India
Gender:
Posts: 1456
Topics: 135
Re: 404 redirection... .htaccess?
May 22, 2010, 08:17:01 AM
Those codes in htaccess file always confuse me lot.
Help us to keep this forum clean. Report the SPAM!
polas
Reputation Power: 17
Code Guru
Gender:
Posts: 1403
Topics: 86
Re: 404 redirection... .htaccess?
August 13, 2010, 04:13:59 PM
Quote from: Admin on May 22, 2010, 08:17:01 AM
Those codes in htaccess file always confuse me lot.
Luckilly there are millions of web pages out there with reference information and example on
Mesham Type Oriented Parallel Programming Language
,
Free online technical support
Abhi
Reputation Power: 19
Code Guru
Location: India
Gender:
Posts: 1456
Topics: 135
Re: 404 redirection... .htaccess?
August 13, 2010, 08:27:38 PM
@polas: Yes Polas, Internet makes many things simple for us all.
Help us to keep this forum clean. Report the SPAM!
morganfieldwueq
Reputation Power: 1
New Coder
Posts: 16
Topics: 1
Re: 404 redirection... .htaccess?
March 08, 2011, 09:53:11 PM
It may possible,but I have never tried that as I always use the default 404 page of my CMS
Email this topic
|
Print
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
Technical Resources - Articles and Videos
-----------------------------
=> Read/Post Free Articles
===> SEO and Marketing
===> Graphics and Design
===> Operating Systems
===> Programming
===> Gadget and Product Review
=> Video Tutorials
-----------------------------
Programming and Web Development
-----------------------------
=> C/C++
=> Visual Basic 6.0
=> Classic ASP 3.0
=> .NET
=> PHP
=> JAVA
=> Python
=> JavaScript and VBScript - Scripting Languages
=> Web Security
=> Other programming languages
=> Database Programming Discussions
===> Microsoft SQL Server
===> My SQL
-----------------------------
Graphics and Web Design
-----------------------------
=> HTML/XHTML/DHTML & CSS
=> Photoshop and Flash
=> General Web Design
=> Review your website or blog
-----------------------------
Operating Systems
-----------------------------
=> Windows
=> Linux and Unix
=> General - Operating System Discussion
-----------------------------
SEO and Marketing Success Strategy
-----------------------------
=> Search Engines
===> Google
===> Yahoo
===> Microsoft Bing
=> SEO - Search Engine Optimization
===> Web Directories
===> Link Development
=> Internet Marketing and Advertising
===> Affiliate Programs
===> Generating Revenue
===> Increasing Traffic
=> General Marketing Discussion
=> Promote Your Service
-----------------------------
Web Hosting and Hosting Management
-----------------------------
=> Web Hosting Talk
=> Web Hosting offers and plans
-----------------------------
Miscellaneous
-----------------------------
=> Blogging - Blogger's Paradise
=> Social Networks
=> Tips and Tricks
=> Chit Chat - Non Programming
-----------------------------
Forum Information
-----------------------------
=> Introduce Yourself
=> Suggestions and Feedback
=> Forum Rules/Guidelines/News/Announcements
=> Forum Support
=> Forum Games and Contests
===> Games
Home
|
Advertise
|
Forum Help
|
Privacy Policy
|
Contact us
Powered by SMF 1.1.16
|
SMF © 2011, Simple Machines
Google visited last this page April 22, 2012, 04:59:54 AM
Loading...