Jump to content

Creating a friendly URL for a custom .tpl page ?


Ray UK

Recommended Posts

Hi,

 

I have created a custom "Store Details" page using "Preferences/Store Contacts" and storedetails.tpl, controllers etc...

 

The URL I end up with is www.no-match.co.uk/storedetails?storeid=34

The URL I want is www.no-match.co.uk/34

 

How and where would I accomplish this ?

 

I will eventually end up with www.no-match.co.uk/southport but im going 1 step at a time whilst learning.

 

Thanks

 

Edited by MerseyRay (see edit history)
Link to comment
Share on other sites

Hi Patron,

 

I already have an entry there which just puts "storedetails" after our domain.

the  "?storeid=Southport" is then added.

 

I wish to remove all of the storedetails?storeid=Southport and replace with just Southport

 

The finished url should be www.no-match.co.uk/Southport

 

Looking in the SEO URLs section I cant see any entry that adds any variables to the url.

 

Cheers

Edited by MerseyRay (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Ok I cant suss this out.

 

I have entered the friendly url via the "Preferences/SEO & URLs" section in the BO

 

That gives me the no-match.co.uk/storedetails

 

The variables afterwards I cannot tidy up.

 

I tried

 

RewriteEngine On
RewriteRule ^([^/]*)\.html$ /storedetails?storeid=$1 [L]​

 

in the .htaccess

 

I thought that should return www.no-match.co.uk/southport.html

 

But it doesnt.. And besidesI would prefer without the suffix

 

The end result I would like is no-match.co.uk/southport

but currently it is showing like no-match.co.uk/storedetails?storeid=southport

 

Any help is appreciated.

 

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...