Re: 404 redirects "stolen" by provider
| From: | Merlin Morgenstern | Date: | Sat, 10 Apr 2010 07:24:05 +0000 |
| Subject: | Re: 404 redirects "stolen" by provider | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-303970@lists.php.net to get a copy of this message | ||
Am 09.04.2010 23:15, schrieb Peter Lind:
On 9 April 2010 23:08, Merlin Morgenstern<merlin_x@fastmail.fm> wrote:This will not work, as I do have a bunch of other redirects inside the page. What might work is a rule, that redirects urls that do not have a full stop or slash inside. Is this possible? My regex knowledge is unfortunatelly pretty limited.Am 09.04.2010 22:58, schrieb Peter Lind:The above rule will try to redirect everything to /subapp_members/search_user.php. If you're looking to allow example.com/username, then use something like: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /subapp_members/search_user.php?member=$1 [L] This is likely to not do what you want from it, but it's the closest I can guess as to what you want. Have a read of http://httpd.apache.org/docs/2.2/mod/mod_rewrite.htmlOn 9 April 2010 22:20, Merlin Morgenstern<merlin_x@fastmail.fm> wrote:regex knowledge is pretty limited. The command: RewriteRule ^(.+) /subapp_members/search_user.phpThis sounds like the best solution to me. The only problem is that my
Try:RewriteRule ^([^./]+)$ /yourfile.php?variable=$1 [L] Apart from that, rewrite rules work in order. If a rule above this triggers and has the L flag, those below won't get processed. Hello Peter, thank you for the rewrite rule. This workes perfectly!! The other ideas like sending 200 afterwards did not work as 404 has already been sent. Thank you for you help! Merlin