Author Topic: Change /index.php?template=somepage in /somepage.html ??  (Read 5696 times)

0 Members and 1 Guest are viewing this topic.

Offline wflorian

  • Newbie
  • *
  • Posts: 47
    • View Profile
Change /index.php?template=somepage in /somepage.html ??
« on: December 25, 2008, 02:14:39 AM »
Is it possible to change the URL of additional pages I created. The URL right now is www.XXXX.com/index.php?template=somepage
Can I change that URL design to something more seo friendly? i already installed url mod, so thate categorie are shown like /catXXX.htm

Any ideas?

Thank you in advance.

Regards
Florian

Offline om6acw

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • My Animal's World
Re: Change /index.php?template=somepage in /somepage.html ??
« Reply #1 on: December 25, 2008, 02:23:36 AM »
Is it possible to change the URL of additional pages I created. The URL right now is www.XXXX.com/index.php?template=somepage
Can I change that URL design to something more seo friendly? i already installed url mod, so thate categorie are shown like /catXXX.htm

Any ideas?

Thank you in advance.

Regards
Florian

just try call your additional page like this www.your_domain.com/somepage.html

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Change /index.php?template=somepage in /somepage.html ??
« Reply #2 on: December 25, 2008, 02:24:43 AM »
add in your .htaccess:
Code: [Select]
RewriteRule ^somepage.html$  index.php?template=somepage [NC,L]
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline om6acw

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • My Animal's World
Re: Change /index.php?template=somepage in /somepage.html ??
« Reply #3 on: December 25, 2008, 02:42:20 AM »
add in your .htaccess:
Code: [Select]
RewriteRule ^somepage.html$  index.php?template=somepage [NC,L]

I think if he has installed mod SEO friendly url he should have line like this
Code: [Select]
RewriteRule ^([a-zA-Z0-9_-]+)\.html$ index.php?template=$1&%{QUERY_STRING}already in his .htaccess file but maybe I'm wrong.

Offline wflorian

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: Change /index.php?template=somepage in /somepage.html ??
« Reply #4 on: December 25, 2008, 08:04:40 AM »
add in your .htaccess:
Code: [Select]
RewriteRule ^somepage.html$  index.php?template=somepage [NC,L]

I think if he has installed mod SEO friendly url he should have line like this
Code: [Select]
RewriteRule ^([a-zA-Z0-9_-]+)\.html$ index.php?template=$1&%{QUERY_STRING}already in his .htaccess file but maybe I'm wrong.

Thank you!!

Actually both work great. I went with:
Code: [Select]
RewriteRule ^([a-zA-Z0-9_-]+)\.html$ index.php?template=$1&%{QUERY_STRING}
Now I am trying to redirect the old pages to the new url, the following code doesn't seem to work:

Code: [Select]
Redirect permanent /index.php?template=somepage http://www.XXXX.com/somepage.htm
Do you know why?
« Last Edit: December 26, 2008, 11:14:45 PM by wflorian »