Jump to content

Friendly URL for custom page


leonardlin

Recommended Posts

Hi,

 

I developed a custom page and would like to assign a friendly URL to it (URL rewrite).

When I go to Preferences->SEO&URLs, to add a new entry, I can only select predefined php-pages from a drop-down menu.

I can't enter my own page.php as target.

 

My custom page is not part of a CMS page.

 

How can I create a friendly URL for my new page?

 

Thanks for any help

Link to comment
Share on other sites

If your custom page is located in the root dir of your website, you can add this to your htaccess file:

 

<IfModule mod_rewrite.c>

RewriteRule ^myFriendlyURL$ /MyRealUrl.php [QSA,L]

</IfModule>

 

Note that you should already have <IfModule mod_rewrite.c></IfModule> section present in the file, you can add the above bold line in the bottom of the section..

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

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