Jump to content

HTACCESS Redirect with PHP code


captaintyson

Recommended Posts

Hi Guys,

 

I'm working with a client who needs to do a HTACCESS redirect.

 

I need to redirect it so that when someone goes to the url it would be "www.url.org/page/portfolio" instead of "www.url.org/?page=portfolio".

 

I tried using this http://www.iwebtool.com/htaccess_url_rewrite to get this:

 

Options +FollowSymLinks
RewriteEngine on

RewriteRule /page/(.*)\.php ?page=$1

 

And this code that a friend gave me:

RewriteEngine on
RewriteRule page/(.*)/ index.php?page=$1
RewriteRule page/(.*) index.php?page=$1

 

But didn't have any success. Any of the fellow geeks around here know what I'm doing wrong?

 

Thanks in advance! I'm brain dead and this is the only SEO friendly way!

Link to comment
https://forums.phpfreaks.com/topic/207809-htaccess-redirect-with-php-code/
Share on other sites

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.