开发者

Provide an alternative URL for an existing one

I need some help. I have a page at /register. However, I also want to be able to view this register page at /book-your-place-now. I know that is possible wi开发者_Go百科th .htaccess but I cannot for the live of me get me head around .htaccess files.


You can use mod_rewrite (it has to be enabled on your host)

RewriteEngine on
RewriteRule ^book\-your\-place\-now$ register [L]

This will make sure that if someone enters exactly http://www.domain.com/book-your-place-now the page http://www.domain.com/register will be loaded.


If you already have a .htaccess file add this

RewriteRule ^book-your-place-now$
register  [L] 

If not here is what you need I believe:

Options +FollowSymlinks
RewriteEngine  on

RewriteRule ^book-your-place-now$
register  [L] 

Here is a cool little tool that I used to help me understand htaccess: CoolTips.de .htaccess file generator

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜