I am trying to adjust my htacess file to skip the rewrite rule if the file or directory exists, but when the file exists, it changes the URL to something different. I don't know why this is happening. Here is my htaccess file:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^project/([^/.]+)/?$ index.php?view=project&project=$1 [L]
RewriteRule ^for/content/ag index.php?view=opening§ion=ag [L]
RewriteRule ^for/content/bus index.php?view=opening§ion=bus [L]
RewriteRule ^for/content/fcs index.php?view=opening§ion=fcs [L]
RewriteRule ^for/content/market index.php?view=opening§ion=market [L]
RewriteRule ^for/content/trade index.php?view=opening§ion=trade [L]
RewriteRule ^for/content/teched index.php?view=opening§ion=teched [L]
RewriteRule ^for/content/([^/.]+)/?$ index.php?view=content_area§ion=$1 [L]
The directory /project/nti exists, with an index.php file. When the address mywebsite.com/folder/project/nti is entered, it changes to mywebsite.com/folder/project/nti/?view=project&project=nti. I am applying this on a test server where the sample site is in a subfolder, but when implemented, it will be in the root web server folder.
Thanks for any help!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…