Forums

  • # April 17, 2013 at 5:31 am

    i have been trying to put this .htaccess code,but when i upload it ,it redirects me to the default 404 page.

    what should i do, any help RewriteEngine On
    RewriteRule ^([a-zA-Z0-9_-]+)$profile.phpu=$1
    RewriteRule ^([a-zA-Z0-9_-]+)/$profile.phpu=$1

    # April 17, 2013 at 5:35 am

    I’m not experienced with htaccess but what is `phpu`?

    `$profile.phpu`

    # April 17, 2013 at 5:41 am

    Googling around I’ve seen it as such:

    RewriteEngine On
    RewriteRule ^([a-zA-Z0-9_-]+)$profile.php?u=$1
    RewriteRule ^([a-zA-Z0-9_-]+)/$profile.php?u=$1

    Notice the `?`.

    # April 17, 2013 at 5:44 am

    The above should work

    __
    # April 17, 2013 at 5:00 pm

    yes, there should be a single space.

    Also, you don’t need two rules: just make the trailing slash optional.

    RewriteRule ^([-_a-zA-Z0-9]+/?)$ profile.php?u=$1

    # May 25, 2013 at 6:12 am

    Help Me, this is not working as i am having a page profile.php but it give me error after i use the above code in .htaccess further when i remove .htaccess it doesn’t give me error but i have to use profile.php?u=
    Do .htaccess affects with subdomains as i am having subdomain for eg: – rahulkapoor.webege.com!

    # May 25, 2013 at 7:12 am

    code is same as that of @traq(above)
    i am not getting any error but i want to use like rahulkapoor.webege.com/rahulkapoor instead of rahulkapoor.webege.com/profile.php?u=rahulkapoor but that’s not working so it leads me to default 404 page.

    # May 25, 2013 at 7:15 am

    same as that of @traq(above)

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag