Jump to content

Recommended Posts

Hello, i need to change the display url in the browser with httaccess 

 

This is the link in the browser:
 fun.php?search=&submit=search&page=1

And i want to change in to this

fun/page/1

This is what i try to do, I created a .httacces file in public html with this text in it.

RewriteEngine On


# Rewrite all php files    
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [L]


# Rewrite blog pagination
RewriteRule ^fun/page/([a-zA-Z_-]+)/([0-9]?) fun.php?search=&submit=search&page=$1 [L,QSA]

But it doenst work.

 
 
Thanks in advance for any help.

Well, for one, it doesn't match what you described. You said "fun/page/1" but your RewriteRule says "fun/page/stuff/1". And that "stuff" isn't going into the replacement URL so I guess it doesn't matter? Looks like it's supposed to be the search term though?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.