|
|
| ||||||
| alt.apache.configuration Apache web server configuration issues. |
![]() |
| | Thread Tools |
| | #1 |
|
Posts: n/a Hébergeur: | I've got a URL structure created using mod_rewrite. Now, for a few of the rules in there I'd like to have 404's returned. How do I change for example this line to return a 404 when it's matched? RewriteRule ^rss/?$ /rss.html [QSA,L] |
|
| | #2 |
|
Posts: n/a Hébergeur: | Dave Mabe wrote: > I've got a URL structure created using mod_rewrite. Now, for a few of > the rules in there I'd like to have 404's returned. > > How do I change for example this line to return a 404 when it's > matched? > > RewriteRule ^rss/?$ /rss.html [QSA,L] I don't think I understand your question? Do you want to output a 404 error instead of the other page being output, as you have it above? How about instead of the rewrite, you just remove the rss directory (or rename it) and not have a redirect/rewrite rule, and it'll naturally produce a 404 error? Or, are you trying to keep the directory, but just give a 404 based on the URL or domain they are accessing the directory from, to force visitors to view it via one specific URL? -- Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc. Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers and Custom Hosting. 24/7 support, 30 day guarantee, secure servers. Industry's most experienced staff! -- Web Hosting With Muscle! |
|
![]() |
| Thread Tools | |
| |