Jump to content

Simple rewrite without using Multiviews


galvin

Recommended Posts

If I do NOT want to use "Multiviews", how would I write the Rewrite rule for the following...

 

I want to rewrite www.mydomain.com/profile to www.mydomain.com/profile.php

 

I assumed it would be this below, but it's not working...

 

Options +FollowSymlinks
RewriteEngine on

RewriteRule ^profile$ /profile.php [NC,L]

 

Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/253906-simple-rewrite-without-using-multiviews/
Share on other sites

I think your main issue is not having the RewriteBase (I think thats what it is) set to be /, without that you need to add the beginning slash:

 

RewriteRule ^/profile$ /profile.php [NC,L]

 

And see how that goes. Also make sure that MultiViews is turned off as that could be affecting it too.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.