Jump to content


Photo

How to change the pagination url in httacces

.httacces pagination browser

  • Please log in to reply
1 reply to this topic

#1 Tasos

Tasos

    Advanced Member

  • Members
  • PipPipPip
  • 50 posts

Posted 04 April 2014 - 10:12 PM

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.


#2 requinix

requinix

    Hopeless Member

  • Moderators
  • 5,924 posts
  • LocationWA

Posted 04 April 2014 - 10:43 PM

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?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com