Jun 8, 2012

htaccess rewrite not working


I want to rewrite http://example.com/apps/app4/step1.php to http://easyfanpageapp.com/apps/

I have used this rewrite but it’s not working.

RewriteEngine On
RewriteBase /
RewriteRule    ^apps/?$    ^(.*)\step1.php$   [NC,L]

Also tried

RewriteRule    ^apps/?$     apps/app4/step1.php$   [NC,L]

What could be wrong?

Asked by Frank


The rule that does what you ask is:

RewriteRule ^apps apps/app4/step1.php [NC,L]

Depending on your app, you may want more:

RewriteRule ^apps(.*) apps/app4/step1.php?args=$1 [NC,L]
Answered by Ladadadada

Related posts:

  1. Adding a rule to my htaccess subdomain rewrite
  2. rewrite rule for .htaccess not working for php file
  3. Troubleshooting a .htaccess wildcard subdomain rewrite
  4. .htaccess rewrite issues with homepage
  5. .htaccess Rewrite not triggering

Leave a comment