4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: wflorian on December 25, 2008, 02:14:39 AM

Title: Change /index.php?template=somepage in /somepage.html ??
Post by: wflorian 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
Title: Re: Change /index.php?template=somepage in /somepage.html ??
Post by: om6acw 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
Title: Re: Change /index.php?template=somepage in /somepage.html ??
Post by: V@no on December 25, 2008, 02:24:43 AM
add in your .htaccess:
Code: [Select]
RewriteRule ^somepage.html$  index.php?template=somepage [NC,L]
Title: Re: Change /index.php?template=somepage in /somepage.html ??
Post by: om6acw 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.
Title: Re: Change /index.php?template=somepage in /somepage.html ??
Post by: wflorian 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?